"""CourseSelectionSystem URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path, re_path
from .views import CourseListView, SelectedListView, CourseDetailView, SelectCourseView, CourseAddView,\
    CourseStudentListView, CourseDeleteView

app_name = "courses"

urlpatterns = [
    re_path(r'course_list/', CourseListView.as_view(), name='course_list'),
    re_path(r'selected_list/', SelectedListView.as_view(), name='selected_list'),
    re_path(r'course_detail/(?P<course_id>[0-9]+)/', CourseDetailView.as_view(), name='course_detail'),
    re_path(r'select_course/(?P<course_id>[0-9]+)/', SelectCourseView.as_view(), name='select_course'),
    re_path(r'course_add/', CourseAddView.as_view(), name='course_add'),
    re_path(r'course_student_list/(?P<course_id>[0-9]+)/', CourseStudentListView.as_view(), name='course_student_list'),
    re_path(r'course_delete/(?P<course_id>[0-9]+)/', CourseDeleteView.as_view(), name='course_delete'),
]